<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>CreateMesh</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">CreateMesh()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#006666"><b>CreateMesh</b></font>(#Mesh [, Type [, Mode])</blockquote>

<b>概要</b><br><blockquote>



Creates a new empty #Mesh. After creation the further commands of this library like 
<a href="meshvertexposition.html">MeshVertexPosition()</a> or <a href="meshface.html">MeshFace()</a> can be used, to build it. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Mesh</i></td>
<td width="90%"> 
 
The number to identify the new mesh. <a href="../reference/purebasic_objects.html">#PB_Any</a> can be used to 
auto-generate this number. 

 

</td></tr>
<tr><td><i>Type (optional)</i></td>
<td> 
 
The type of the new mesh. It can be one of the following value: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Mesh_TriangleList</font> : the mesh will be composed of a list of triangles (default).
  <font color="#924B72">#PB_Mesh_TriangleStrip</font>: the mesh will be composed of a list of connected triangles (vertices are shared).
  <font color="#924B72">#PB_Mesh_TriangleFan</font>  : the mesh will be composed of a list of triangles sharing the same central vertex point.
  <font color="#924B72">#PB_Mesh_PointList</font>    : the mesh will be composed of a list of points.
  <font color="#924B72">#PB_Mesh_LineList</font>     : the mesh will be composed of a list of lines.
  <font color="#924B72">#PB_Mesh_LineStrip</font>    : the mesh will be composed of a list of connected lines (vertices are shared).
</font></pre>

</td></tr>
<tr><td><i>Mode (optional)</i></td>
<td> 
 
The mode of the new mesh. It can be one of the following value: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Mesh_Static</font> : once created, the mesh can't be modified anymore with the mesh update functions (default). 
  <font color="#924B72">#PB_Mesh_Dynamic</font>: once created, the mesh can be modified with the mesh update functions.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



Returns nonzero if the mesh was created successfully and zero if there was an error. 
If <font color="#924B72">#PB_Any</font> was used as the #Mesh parameter then the new generated number is returned on success. 

 

</blockquote><p><b>Remarks</b></p><blockquote>



If the #Mesh was already created, then it is freed and replaced by a new one. 

 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=createline3d.html>CreateLine3D()</a> - <a href=index.html>Mesh Index</a> - <a href=createplane.html>CreatePlane()</a> -&gt;



</body></html>